<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>权限管理中心页面</title>
    <!--CSS-->
	<link rel="stylesheet" type="text/css" href="static/js/third-js/extjs66/theme-neptune/resources/theme-neptune-all.css"/>
    <link rel="stylesheet" type="text/css"
          href="static/css/chat.css"/>
    <style>
        .x-grid-row td,.x-grid-summary-row td{
            line-height:25px;  //控制GRID高度
        vertical-align:top; //垂直居中
        border-right: 1px solid #eceff6 !important;//控制列线
        border-top: 1px solid #eceff6 !important;//控制行线
        }

        .nav {
            font-weight: bold;
            font-size: 15px;
            color: #FFFFFF;
            text-align: center;
        }

        .nav:hover {
            font-weight: bold;
            font-size: 15px;
            color: #FFFFFF;
            text-shadow: 1px 1px 2px black, -1px -1px 2px #4481CE;
            cursor: pointer;
        }
    </style>
    <!--核心JS-->
    <script type="text/javascript" src="static/js/third-js/extjs66/ext-all.js"></script>
    <!--自己的JS代码 -->
    <script type="text/javascript" src="static/js/public/variable.js"></script>
    <script type="text/javascript" src="static/js/public/method.js"></script>
    <script type="text/javascript" src="static/js/task/variable.js"></script>
    <script type="text/javascript" src="static/js/chat/variable.js"></script>
    <script type="text/javascript" src="static/js/chat/method.js"></script>
    <script type="text/javascript" src="static/js/chat/base.js"></script>
    <script type="text/javascript" src="static/js/chat/store.js"></script>
    <script type="text/javascript" src="static/js/chat/panel.js"></script>
    <script type="text/javascript" src="static/js/chat/grid.js"></script>
    <script type="text/javascript" src="static/js/chat/win.js"></script>
    <script type="text/javascript" src="static/js/chat/webSocket.js"></script>
    <script type="text/javascript" src="static/js/task/taskMethods.js"></script>
    <script type="text/javascript" src="static/js/task/checkBox.js"></script>
    <script type="text/javascript" src="static/js/task/taskFormStore.js"></script>
    <script type="text/javascript" src="static/js/task/grid.js"></script>
    <script type="text/javascript" src="static/js/task/taskListModel.js"></script>
    <script type="text/javascript" src="static/js/task/filter.js"></script>
    <script type="text/javascript" src="static/js/task/taskListStore.js"></script>
    <script type="text/javascript" src="static/js/task/page.js"></script>
    <script type="text/javascript" src="static/js/task/taskResponseList.js"></script>
    <script type="text/javascript" src="static/js/task/taskReceiverList.js"></script>
    <script type="text/javascript" src="static/js/task/panel.js"></script>
    <script type="text/javascript" src="static/js/task/win.js"></script>
    <script type="text/javascript" src="static/js/task/taskForm.js"></script>
    <script type="text/javascript" src="static/js/auth/checkBox.js"></script>
    <script type="text/javascript" src="static/js/auth/store.js"></script>
    <script type="text/javascript" src="static/js/auth/grid.js"></script>
    <script type="text/javascript" src="static/js/auth/form.js"></script>
    <script type="text/javascript" src="static/js/auth/method.js"></script>
    <script type="text/javascript" src="static/js/auth/panel.js"></script>
    <script type="text/javascript" src="static/js/auth/win.js"></script>
    <!--自己的JS代码 -->
    <script type="text/javascript">
        //就绪函数：当htnml文档加载完成后再执行的函数！防止找不到对象
        //上北下南（设置高度），左西右东（设置宽度），（剩下的分配给） 中间
        Ext.define('navigationField', {
            extend: 'Ext.form.field.Display',
            width: '9%',
            fieldCls: 'nav',
            margin: '50 0 0 10',
            // listeners: [{
            //     render: function (p) {
            //         p.getEl().on('click', function () {
            //             alert('hhh');
            //         });
            //     }
            // }]
        });
        Ext.onReady(function(){
			//东南西北大框架
            Ext.create('Ext.Viewport', {
                title: '权限管理中心页面',
                layout: 'border',
                items: [{
                    region: 'north',
                    height: '10%',
                    border: false,
                    margin: '0,0,0,0',
                    bodyStyle: 'background: #4481CE',
                    layout: 'hbox', //横向格子布局
                    items: [{
                        xtype: 'panel',
                        width: '70%',
                        height: '100%',
                        border: false,
                        bodyStyle: 'background: #4481CE',
                        items: [{
                            xtype: 'panel',
                            layout: 'hbox', //横向格子布局
                            border: false,
                            bodyStyle: 'background: #4481CE',
                            items: [
                                Ext.create('navigationField', {
                                    value: '权限管理',
                                    listeners: [{
                                        render: function (p) {
                                            p.getEl().on('click', function () {
                                                Ext.getCmp('centerRegion').removeAll(false);
                                                Ext.getCmp('centerRegion').add(mainTabPanel);
                                                mainTabPanel.setActiveTab(0);
                                            });
                                        }
                                    }]
                                })
                            ]
                        }]
                    }, {
                        xtype: 'panel',
                        width: '30%',
                        height: '100%',
                        border: false,
                        bodyStyle: 'background: #4481CE',
                        items: [{
                            xtype: 'toolbar',
                            style: 'background: #4481CE',
                            border: false,
                            items: ['->', {
                                xtype: 'splitbutton',
                                text: 'hi ~ ' + currentUser,
                                tooltip: '当前用户:' + currentUser,
                                icon: 'static/images/icons/fam/user.gif',
                                menu: new Ext.menu.Menu({
                                    items: [{
                                        text: '注销',
                                        icon: 'static/images/icons/fam/delete.gif',
                                        handler: function () {
                                            userLogout();
                                        }
                                    }]
                                })
                            }]
                        }]
                    }]
                },taskTabPanel,{
                    region: 'center',     // center region is required, no width/height specified
                    layout: 'fit',
                    margin: '5 5 0 0',
                    id: 'centerRegion',
                    border: false,
                    header: false
                }]
            });
            chatOnlineKey = getUuid();//生成Key
            webSocket = createWebSocket('ws://' + gateWayUrl + '/websocket/chat/' + currentUserId + '/' + chatOnlineKey);//进行webSocket连接
        });
    </script>
</head>
<body>
</body>
</html>